package TwentyOne.Class.Define;

class Book{
    private int bid;
    private String title;
    private double price;
    private static int count=0;
    public Book(String title,double price){
        this.bid=count+1;
        this.title=title;
        this.price=price;
        count++;
    }
    public String getInfo(){
        return "图书编号：" + this.bid + "、名称："+ this.title + "、价格：" +this.price ;
    }
    public static int getCount(){
        return count;
    }

    public void setBid(int bid){
        this.bid=bid;
    }
    public void setTitle(String title){
        this.title=title;
    }
    public void setPrice(double price){
        this.price=price;
    }
    public int setBid(){
        return this.bid;
    }
    public String setTitle(){
        return this.title;
    }
    public double setPrice(){
        return this.price;
    }
}

public class a7_Book {
    public static void main(String[] args) {
        Book b1=new Book("Java", 89.2);
        Book b2=new Book("Oracle", 79.2);
        System.out.println(b1.getInfo());
        System.out.println(b2.getInfo());
        System.out.println("图书总册数："+Book.getCount());
    }
}
